﻿using ChuanYe.CountyFireManagement.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ChuanYe.CountyFireManagement.Api.Models
{
    public class UserRequest
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 登录名
        /// </summary>
        public string AccountName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }

        /// <summary>
        /// 手机
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 部门编号
        /// </summary>
        public int DepId { get; set; }

        /// <summary>
        /// 职务编号
        /// </summary>
        public int PositionId { get; set; }

        /// <summary>
        /// 选填 排序
        /// </summary>
        public int? Sort { get; set; }

        /// <summary>
        /// 权限编号
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 所在 区
        /// </summary>
        public string AddressCounty { get; set; }

        /// <summary>
        /// 所在 镇
        /// </summary>
        public string AddressTown { get; set; }

        /// <summary>
        /// 所在 村
        /// </summary>
        public string AddressVillage { get; set; }

        /// <summary>
        /// 选填  创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
    }

    public class AddressUserSearchRequest 
    {
        /// <summary>
        /// 部门
        /// </summary>
        public int DepId { get; set; }

        /// <summary>
        /// 事发地点(区县)
        /// </summary>
        public string AddressCounty { get; set; }

        /// <summary>
        /// 事发地点(乡镇)
        /// </summary>
        public string AddressTown { get; set; }

        /// <summary>
        /// 事发地点(村组)
        /// </summary>
        public string AddressVillage { get; set; }
    }

    public class SuperAndSubPowerRequest 
    {
        public string PowerKey { get; set; }
    }


    public class RemoveDepartmentRequest
    {
        /// <summary>
        /// 部门编号
        /// </summary>
        public int DepId { get; set; }
    }

    public class DepartmentRequest : RemoveDepartmentRequest
    {
        /// <summary>
        /// 部门名称
        /// </summary>
        public string DepName { get; set; }
        /// <summary>
        /// 选填 描述
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 选填 排序
        /// </summary>
        public int? Sort { get; set; }
    }

    public class RemovePositionRequest 
    {
        public int PositionId { get; set; }
    }

    public class PositionRequest : RemovePositionRequest
    {
        /// <summary>
        /// 职务名称
        /// </summary>
        public string PositionName { get; set; }

        /// <summary>
        /// 选填 排序
        /// </summary>
        public int? Sort { get; set; }
    }


    public class InformUserRequest
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 火灾编号
        /// </summary>
        public int FireId { get; set; }
    }

    public class RoleRequest 
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string RoleName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 可选参数 可用状态 
        /// </summary>
        public int? Enabled { get; set; }

        /// <summary>
        /// 权限级别 1  101 101201 101201301
        /// </summary>
        public int RoleLevelId { get; set; }
    }

    public class RolePowerRequest 
    {
        /// <summary>
        /// 主键 
        /// </summary>
        public int RolePowerId { get; set; }
        /// <summary>
        /// 权限编号
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 权限明细编号
        /// </summary>
        public int PowerId { get; set; }

        /// <summary>
        /// 可选 增加时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
    }

    public class RolePowerSearchRequest
    {
        public int RoleId { get; set; }
    }


    public class RolePowerSearchRequest2 : RequestPageBase
    {
        /// <summary>
        /// RoleName,PowerKey,PowerName
        /// </summary>
        public override string Keyword { get; set; }
    }

    public class PowerRequest 
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int PowerId { get; set; }

        /// <summary>
        /// 明细Key
        /// </summary>
        public string PowerKey { get; set; }

        /// <summary>
        /// 明细名称
        /// </summary>
        public string PowerName { get; set; }

        /// <summary>
        /// 上级PowerId 明细
        /// </summary>
        public int? ParentId { get; set; }

        /// <summary>
        /// 弃用
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 选填 排序
        /// </summary>
        public int? Sort { get; set; }

        /// <summary>
        /// 选填 默认为PowerName
        /// </summary>
        public string ShowName { get; set; }
    }

    public class RoleSearchRequest : RequestPageBase
    {
        public string RoleName { get; set; }
    }
    public class RemoveRoleRequest 
    {
        public int RoleId { get; set; }
    }
    public class PowerSearchRequest : RequestPageBase 
    {
        public string PowerName { get; set; }
        public string PowerKey { get; set; }
    }

    public class RemovePowerRequest 
    {
        public int PowerId { get; set; }
    }

    public class RemoveRolePowerRequest 
    {
        public int RolePowerId { get; set; }
    }

    public class DepartmentSearchRequest : RequestPageBase
    {
        /// <summary>
        ///  DepName
        /// </summary>
        public override string Keyword { get; set; }
    }

    public class PositionSearchRequest : RequestPageBase
    {
        /// <summary>
        ///  PositionName
        /// </summary>
        public override string Keyword { get; set; }
    }

    public class RemoveUserRequest 
    {

        /// <summary>
        /// 用户编号
        /// </summary>
        public int UserId { get; set; }
    }

    public class UserSearchRequest : RequestPageBase
    {
        /// <summary>
        ///  AccountName,RealName,DepName,PositionName
        /// </summary>
        public override string Keyword { get; set; }

        /// <summary>
        /// (区县)
        /// </summary>
        public string AddressCounty { get; set; }

        /// <summary>
        /// (乡镇)
        /// </summary>
        public string AddressTown { get; set; }

        /// <summary>
        /// (村组)
        /// </summary>
        public string AddressVillage { get; set; }

    }
}
